//
//  GroupItemInfoView.m
//  sentorise
//
//  Created by admin on 2025/9/18.
//

#import "GroupItemInfoView.h"

@interface GroupItemInfoView()

@property (weak, nonatomic) IBOutlet UILabel *titleLabel;
@property (weak, nonatomic) IBOutlet UILabel *descLabel;
@property (weak, nonatomic) IBOutlet UIButton *gotBtn;
@property (weak, nonatomic) IBOutlet UIButton *morebtn;
@property (weak, nonatomic) IBOutlet UILabel *itemTitleLabel1;
@property (weak, nonatomic) IBOutlet UILabel *itemTitleLabel2;
@property (weak, nonatomic) IBOutlet UILabel *itemTitleLabel3;
@property (weak, nonatomic) IBOutlet UILabel *itemTitleLabel4;

@end

@implementation GroupItemInfoView

- (instancetype)initWithFrame:(CGRect)frame {
    self = [super initWithFrame:frame];
    if (self) {
        self.titleLabel.text = NSLocalizedString(@"Set up battery system", nil);
        self.descLabel.text = NSLocalizedString(@"Battery core abnormality", nil);
        [self.gotBtn setTitle:NSLocalizedString(@"Got it", nil) forState:UIControlStateNormal];
        [self.morebtn setTitle:NSLocalizedString(@"More information", nil) forState:UIControlStateNormal];
        self.itemTitleLabel1.text = NSLocalizedString(@"System Power", nil);
        self.itemTitleLabel2.text = NSLocalizedString(@"System Current", nil);
        self.itemTitleLabel3.text = NSLocalizedString(@"System voltage", nil);
        self.itemTitleLabel4.text = NSLocalizedString(@"Remaining Capacity", nil);
    }
    return self;
}

- (IBAction)actionClose:(id)sender {
    [self removeFromSuperview];
}

- (IBAction)actionL:(id)sender {
    self.clickItem(0);
    [self removeFromSuperview];
}

- (IBAction)actionR:(id)sender {
    self.clickItem(1);
    [self removeFromSuperview];
}

@end
